<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>session记录页面访问次数</title>
</head>
<body>
<%!
int i=0;
%>
<%
Object o=session.getAttribute("count");
if(o==null){
	session.setAttribute("count", i+1);
}else{
	i++;
	session.setAttribute("count", i);
}
%>
session记录页面访问次数为：<%=session.getAttribute("count") %>次
</body>
</html>